snippet	express
	const http = require('http');
	const express = require('express');
	const bodyparser = require('body-parser');
	const crypto = require('crypto');
	const proxy = require('http-proxy-middleware');
	const _ = require('lodash');
	const moment = require('moment');

	const app = express();
	http.createServer(app).listen(${1:8000}, '0.0.0.0');

	app.use(bodyparser.urlencoded({extended:false}));
	app.use(bodyparser.json());
	app.use((req,res,next)=>{
		next();
	});

	app.use('/api/', proxy({target: 'http://www.example.org', changeOrigin: true}));

	${2}
snippet	use
	app.${1:get}(${2:'/', }function(req, res, next){
		${3}
	});
snippet	usea
	app.${1:get}(${2:'/', }function(req, res, next){
		(async function(){
			try{
				${3}
			}catch(e){
				console.log(e);
			}
		})();
	});
snippet	route
	app.route(${1})
		.get((req, res)=>{
			${2}
		});
snippet	emiddle
	const db = require('../conn.js');
	const r = require('../err.js');
	module.exports = (req, res, next)=>{
		${1}
	};
snippet	eroute
	const db = require('../conn.js');
	const r = require('../err.js');
	module.exports = (app)=>{
		app.route(${1})
			.get((req, res)=>{
				${2}
			});
	};
snippet	try
	try{
		${1}
	}catch(e){
		console.log(e);
	}
snippet	async
	async function work(){
		try{
			${1}
		}catch(e){
			console.log(e);
		}
	}
snippet	()
	(${1})();
snippet	=>
	(${1})=>${2}
snippet	(=
	(${1})=>{
		${2}
	}
snippet	(r
	(req, res)=>{
		${1}
	}
snippet	(n
	(req, res, next)=>{
		${1}
	}
snippet r
	require('${1:http}');
	${2}
snippet	w
	document.write("${1:...}");
snippet	http
	var ${1:testCtrl} = function($scope, $http){
		var p = $http({
		  method: 'POST',
		  url: '${2:json.php}'
		});
		p.success(function(response, status, headers, config){
			$scope.${3:data} = response;
		});
	  };${4}
snippet	ajax
	$.post("${1:get.php}", { 
		${2:param}: ${3:value}
		}, function (data, textStatus){
			${4:code here...}
		}, ${5:"json"});${6}
snippet	keys
	Object.keys(${1:obj}).forEach(o=>console.log(o))
# Prototype
snippet	log
	console.log(${1});
snippet proto
	${1:class_name}.prototype.${2:method_name} =
	function(${3:first_argument}) {
		${4:// body...}
	};
# Function
snippet fun
	function ${1:function_name} (${2:argument}) {
		${3:// body...}
	}
# Anonymous Function
snippet f
	function(${1}) {
		${2}
	}
# if
snippet if
	if (${1:true}) {
		${2}
	}
# if ... else
snippet ife
	if (${1:true}) {
		${2}
	}else{
		${3}
	};
# tertiary conditional
snippet t
	${1:/* condition */} ? ${2:a} : ${3:b}
# switch
snippet switch
	switch(${1:expression}) {
		case '${3:case}':
			${4:// code}
			break;
		${5}
		default:
			${2:// code}
	}
# case
snippet case
	case '${1:case}':
		${2:// code}
		break;
	${3}
# for (...) {...}
snippet for
	for (var ${2:i} = 0; $2 < ${1:Things}.length; $2${3:++}) {
		${4:$1[$2]}
	};
# for (...) {...} (Improved Native For-Loop)
snippet forr
	for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) {
		${4:$1[$2]}
	};
# while (...) {...}
snippet wh
	while (${1:/* condition */}) {
		${2:/* code */}
	}
# do...while
snippet do
	do {
		${2:/* code */}
	} while (${1:/* condition */});
# Object Method
snippet :f
	${1:method_name}: function(${2:attribute}) {
		${4}
	}${3:,}
# setTimeout function
snippet timeout
	setTimeout(function() {${3}}${2}, ${1:10};
# Get Elements
snippet get
	getElementsBy${1:TagName}('${2}')${3}
# Get Element
snippet gett
	getElementBy${1:Id}('${2}')${3}

snippet httpn
	var http = require('http');
	var options = {
		host:${1:www.qq.com},
		port:${2:80},
		method:"GET",
		path:encodeURI(${3:/}),
		headers:{
		}
	};
	http.request(options, function(res){
		var html = '';
		res.on("data", function(data){
			html += data;
		}).on("end", function(){
			${4:console.log(html);}
		})
	}).on("error", function(e){
	}).end(function(){
	});
snippet	httph
	'Content-Type': 'application/x-www-form-urlencoded',
	'Content-Length': Buffer.byteLength($1),
	"Referer":	"$2",
	"DNT":"1",
	"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
	"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17",
	"Origin":"$3",

